home *** CD-ROM | disk | FTP | other *** search
/ Power DOS 1996 July / Power DOS - July 1996.iso / sound / c_labs / devinfo / mpu401.exe / README.TXT < prev    next >
Text File  |  1996-04-18  |  3KB  |  100 lines

  1.                    Sound Blaster 16 MIDI programming
  2.           -----------------------------------------------------
  3.           using the MPU-401 port or the Sound Blaster MIDI port
  4.           -----------------------------------------------------
  5.  
  6.                                30 Jun 93
  7.  
  8.                  Copyright (c) 1993-1996 Creative Labs, Inc.
  9. -----------------------------------------------------------------------
  10. Summary:
  11.  
  12. The MIDI directory on this disk contains various functions to implement
  13. MPU-401 MIDI on the Sound Blaster 16.
  14.  
  15. File List:
  16.             SBCUTILS.C
  17.             SBCUTILS.H
  18.             MIDIUTIL.H
  19.             MIDIUTIL.C
  20.             MIDITEST MAK
  21.             MIDITEST.C
  22.             MIDITEST.EXE
  23.  
  24.  
  25. SBCUTILS.C, SBCUTILS.H
  26. ----------------------
  27. Contains functions, data structures, and constants that are universal
  28. across all the Sound Blaster cards.
  29.  
  30. Functions:
  31.     int GetBlastInfo(BLASTREC *blastInfo)
  32.         description: retrieves and parses the BLASTER environment variable.
  33.  
  34.     int DSPReset(void)
  35.         description: resets the Sound Blaster DSP.
  36.  
  37. MIDIUTIL.C, MIDIUTIL.H
  38. ----------------------
  39. Contains functions and constants to access the MPU-401 port on the SB16.
  40.  
  41. Functions:
  42.     void Write_MPU401_Cmd(unsigned char command)
  43.         description: writes a command to the MPU-401 port.
  44.  
  45.     void Write_MPU401_Data(unsigned char data)
  46.         description: writes data to the MPU-401 port.
  47.  
  48.     void Write_SBMIDI_Data(unsigned char data)
  49.         description: writes data to the Sound Blaster MIDI port.
  50.  
  51.     unsigned char Read_MPU401_Data(void)
  52.         description: reads data from the MPU-401 port.
  53.  
  54.     unsigned char Read_SBMIDI_Data(void)
  55.         description: reads data from the Sound Blaster MIDI port.
  56.  
  57.     void Send_MIDI_Message(char *message, int size)
  58.         description: sends a variable length message to the MIDI port.
  59.  
  60.     void Set_MIDI_Vol(char channel, char volume)
  61.         description: sets a MIDI channel's volume.
  62.  
  63.     void Set_MIDI_Notes_Off(char channel)
  64.         description: turns off all notes on a given channel.
  65.  
  66.     void Set_MIDI_Pitch_Bend(char channel, int range)
  67.         description: sets the pitch bend value for a given channel.
  68.  
  69.     int Reset_MPU401(void)
  70.         description: resets the MPU-401 port.
  71.  
  72.     int Set_UART_Mode(int state)
  73.         description: switches UART mode on and off on the MPU-401 port.
  74.  
  75.     int Detect_MIDI(void)
  76.         description: verifies the existence of the MIDI hardware
  77.                      defined in the Blaster Information Record (blastInfo).
  78.  
  79.     int Init_MIDI(void)
  80.         description: for the MPU-401 port, resets the port and selects
  81.                      UART mode.  For both MPU-401 and SBMIDI, sets the
  82.                      channel volumes to 100, turns off any notes that were
  83.                      left hanging, and sets the pitch bend values to 0.
  84.  
  85.     void Exit_MIDI(void)
  86.         description: provides house keeping before exiting the program.
  87.                      This function turns off all notes and if using the
  88.                      MPU-401 port then it turns off UART mode.
  89.  
  90. MIDITEST.C
  91. ----------
  92. Test routine demonstrating the use of
  93.  
  94.     GetBlastInfo()
  95.     Detect_MIDI()
  96.     Init_MIDI()
  97.     Exit_MIDI()
  98.  
  99. All other routines are utilized in these functions.
  100.